package ext.trace.kernel;

import math.math;

public class KernelSqCosine implements Kernel
{
    
    
    
    
    public KernelSqCosine()
    {
        
    }
    
    
    public double eval(double aRadius, double aExtent)
    {
        double piH = math.PI * aExtent;
        double piHSq = piH * aExtent;
        double coeff = 2.0 * piH / (piHSq + math.sin(piHSq));
        double cos = math.cos(0.5 * piH * aRadius);
        double result = coeff * cos * cos;
        return result;
    }
    
}
